/**
 * 菜单目录树 ，暂时只有一级和二级
 * @param routes
 * @returns {[]}
 * @constructor
 */

export function Tree(routes) {
    //const routes = this.$store.getters.routes;
    const arrays = [];
    for (let i = 0; i < routes.length; i++) {
        let arr = [];
        var s = {
            label: routes[i].menuName,
            children: arr
        };
        for (var j = 0; j < routes[i].children.length; j++) {
            var h = {
                label: routes[i].children[j].menuName
            };
            arr.push(h);

        }
        arrays.push(s)
    }
    console.log("at "+JSON.stringify(arrays))
    return arrays;
}

function FindChildren(array) {
    console.log("array "+JSON.stringify(array))
}